import javax.swing.JOptionPane;
import java.awt.datatransfer.StringSelection;
import java.awt.*;

public class RECHNER
{
    private int stand = 0;
    private GUI gui;
    private VARIABLEN variablen;

    public RECHNER(GUI gui)
    {
        this.gui = gui;
        variablen = new VARIABLEN(gui);
    }

    public void zuzaehlen(int zahl)
    {
        stand += zahl;
        pruefen();
    }

    private void pruefen()
    {
        if (stand == 27)
        {
            variablen.setpunkte(variablen.getpunkte() + 100);
            setClipboard("0100100000110100011000110110101100110011011100100111001100100000" +
                "0111011100110001011111000111110000100000" +
                "01100010001100100010000001101011001100010111110001111100001100110110010000100001");
            JOptionPane.showMessageDialog(null,"01001000001101000110001101101011001100110111001001110011\n" +
                "01110111001100010111110001111100\n" +
                "01100010001100100010000001101011001100010111110001111100001100110110010000100001" +
                "\n\nh4v3 th3 t3x7 (1n cl1pbo4rd) conv3rt3d 4nd unl3373d!",
                "H4CK3R", JOptionPane.INFORMATION_MESSAGE);
        }
    }

    public static void setClipboard(String str)
    {
        StringSelection ss = new StringSelection(str);
        Toolkit.getDefaultToolkit().getSystemClipboard().setContents(ss, null);
    }

    private void reset()
    {
        stand = 0;
    }
}